﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GenericLibrariesToolKit;
using GenericLibrariesToolKit.Enumeration;
using Model;
using BLL.Info;
using BLL.Info.Impl;
using BLL.Users;
using BLL.Users.Impl;

public partial class Page_News_NewsInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["newsID"]!= null)
        {
            string newsID = Request.QueryString["newsID"].ToString();

            showNewsInfo(newsID);
        }
    }
    private void showNewsInfo(string newsID)
    {
        //设置where查询条件
        WhereCondition [] whereCondition=new WhereCondition[]
        {
            new WhereCondition(WhereJoinType.NULL,"NewsId",MatchType.EQUAL,newsID),
        };
        NewsBO newsBO = new NewsBOImpl();
        //执行sql查询语句
        DataSet resultNews = newsBO.GetDataSet(-1, -1, whereCondition);
        //得到发布新闻用户的姓名
       // ExpertBO expertBO = new ExpertBOImpl();
        //Expert expert = expertBO.Find(newsPosterID);

         //绑定数据源
        dvNewsInfo.DataSource = resultNews;
        dvNewsInfo.DataBind();
    }
    protected void btnNewsInfoBack_Click(object sender, ImageClickEventArgs e)
    {
        Response.Write("<script language=javascript>history.go(-2);</script>");
    }
}